package DB;

import Communication.Client;
import Communication.MessageHandle;

/** this class asks queries to get and insert worker's details from and into the db  */
public class WorkerQuery {

	

	/**connection to the DB*/

	public void getWorkerDB(Client client, String username) 
	{	
		/**Prepare queries*/
		String workerQuery = "SELECT * FROM workers WHERE UserName = " + "\"" + username + "\"";
		
		/**Get user from customers table*/
		client.getData(workerQuery, MessageHandle.WORKER, false);
		
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
				
	}

}
